package com.jikangjun.disk.quoteinfo.repository;

import com.jikangjun.disk.mybatis.flexigrid.PagingEntity;
import com.jikangjun.disk.quoteinfo.entity.SearchReceivedShareEntity;
import com.jikangjun.disk.quoteinfo.entity.ReceivedShareEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 收到分享数据访问层
 */
@Mapper
public interface QuoteinfoDao {
    
    /**
     * 查询收到分享记录总数
     */
    Integer queryReceivedShareListTotal(SearchReceivedShareEntity entity);
    
    /**
     * 分页查询收到分享记录
     */
    List<ReceivedShareEntity> queryReceivedShareListByPage(@Param("entity") SearchReceivedShareEntity entity, 
                                                          @Param("paging") PagingEntity paging);
    
    /**
     * 根据分享ID查询收到分享信息
     */
    ReceivedShareEntity queryReceivedShareById(String shareId);
    
    /**
     * 更新收到分享状态
     */
    void updateReceivedShareStatus(@Param("shareId") String shareId, @Param("status") Integer status);
    
    /**
     * 更新查看次数
     */
    void updateViewCount(String shareId);
} 